package com.sheepone.util.structure.node;

/**
 * @author Miss.杨
 * @description
 * @since 2024/5/8 - 22:27
 */
public class BinarySearchTreeNode<K extends Comparable<? super K>, V> extends BinaryTreeNode<V> {
    private K key;

    public BinarySearchTreeNode(K key) {
        this.key = key;
    }

    public BinarySearchTreeNode(K key, V value) {
        super(value);
    }

    public BinarySearchTreeNode(V data, BinaryTreeNode<V> left, BinaryTreeNode<V> right) {
        super(data, left, right);
    }

    public BinarySearchTreeNode(K key, V value, BinaryTreeNode<V> left, BinaryTreeNode<V> right) {
        super(value, left, right);
        this.key = key;
    }

    public K getKey() {
        return key;
    }

    public void setKey(K key) {
        this.key = key;
    }
}
